widget.onrestore = function(){
	location.href = "index.html";
}

widget.onmaximize = function(){
	location.href = "login_m.html";
}

window.onload = function(){
	var userId = $('user_id');
	var password = $('password');
	
	var v = Pref.UserId.get();
	userId.value = (!v)? '' : v;
	
	v = Pref.Password.get();
	password.value = (!v)? '' : v;;
	
	$('login').onclick = function(){
		Pref.UserId.set(userId.value);
		Pref.Password.set(password.value);
		widget.restore();
		return;
	}
}
